<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<meta name="viewport"
		  content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
</head>
<body>

<div th:fragment="welcome">
	<div title="欢迎使用" style="padding:20px;overflow:hidden; color:red; ">
		<p style="font-size: 50px; line-height: 60px; height: 60px;" th:if="${session.usertype == '1'}" th:text="${session.admin.username}"></p>
		<p style="font-size: 50px; line-height: 60px; height: 60px;" th:if="${session.usertype == '2'}" th:text="${session.student.username}"></p>
		<p style="font-size: 50px; line-height: 60px; height: 60px;" th:if="${session.usertype == '3'}" th:text="${session.teacher.username}"></p>
		<p style="font-size: 25px; line-height: 30px; height: 30px;">欢迎使用学习营活动管理系统</p>
		<div style="margin-top: 20px;">
			<button class="button" th:if="${session.usertype == '3'}" onclick="location.href='@{/course/course_list}'">新建课程</button>
			<button class="button" th:if="${session.usertype == '2'||session.usertype == '3'}" onclick="location.href='@{/calling/calling_list}'">我要点名</button>
			<button class="button" th:if="${session.usertype == '2'}" onclick="location.href='@{/learningunit/learningunit_list}}'">我要学习</button>
			<button class="button" th:if="${session.usertype == '1'}" onclick="location.href='@{/activity/activity_list}'">新建活动</button>
			<button class="button" th:if="${session.usertype == '1'}" onclick="location.href='@{/clazz/clazz_list}'">新建教学班</button>
		</div>
		<div class="button-container">
			<a href="/attendance/attendance_list" class="shortcut-button">我要点名</a>
			<a href="/learningunit/learningunit" class="shortcut-button">我要学习</a>
		</div>
	</div>
</div>
</body>
</html>
